/* ============================================================
   Carousel.css – Component carrusel reutilitzable
   Mil anys Pau i Treva
   ============================================================ */

/* ========================
   CONTENIDOR
   ======================== */
.conf-carousel {
  position: relative;
  overflow: hidden;
  width: 100%;
}

/* ========================
   TRACK (cinta de slides)
   ======================== */
.conf-carousel__track {
  display: flex;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

/* Cada slide ocupa el % definit per JS (100%, 50% o 33.3%) */
.conf-carousel__slide {
  flex-shrink: 0;
  min-width: 100%; /* JS sobreescriurà si spv > 1 */
  box-sizing: border-box;
  /* Padding lateral: crea l'espai VISIBLE entre les targetes */
  padding: var(--space-xs) 2rem;
  display: flex;
  align-items: stretch;
}

/* Fallback per a slides que no usen el wrapper .conf-carousel__slide */
.conf-carousel__track > *:not(.conf-carousel__slide) {
  flex-shrink: 0;
  min-width: 100%;
  box-sizing: border-box;
}

/* ========================
   BOTONS PREV / NEXT
   ======================== */
.conf-carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-light);
  background: rgba(42, 22, 4, 0.82);
  color: var(--color-accent-light);
  font-size: 1.1rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.22s ease, border-color 0.22s ease, color 0.22s ease;
}

.conf-carousel__btn:hover {
  background: var(--color-accent);
  border-color: var(--color-hover-vivid);
  color: var(--color-white);
}

.conf-carousel__btn--prev {
  left: 4px;
}

.conf-carousel__btn--next {
  right: 4px;
}

/* ========================
   DOTS
   ======================== */
.conf-carousel__dots {
  display: flex;
  justify-content: center;
  gap: var(--space-xs);
  padding-top: var(--space-sm);
}

.conf-carousel__dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid var(--color-accent-light);
  background: transparent;
  cursor: pointer;
  transition: background 0.22s ease, border-color 0.22s ease, transform 0.22s ease;
  padding: 0;
}

.conf-carousel__dot:hover {
  border-color: var(--color-hover-vivid);
  transform: scale(1.2);
}

.conf-carousel__dot--active {
  background: var(--color-accent-light);
  border-color: var(--color-accent-light);
}

/* ========================
   PEU DE FOTO (slides d'experiències)
   ======================== */
.carousel-caption {
  font-size: 0.82rem;
  text-align: center;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--color-text-light);
  padding: var(--space-xs) var(--space-sm);
  font-family: var(--font-sans);
  background: rgba(245, 230, 190, 0.7);
  border-top: 1px solid var(--color-border);
  margin: 0;
}

/* Targeta de conferència dins del carrusel: ocupa tot el slide */
.conf-carousel__slide .card-conferencia {
  width: 100%;
  flex: 1;
}

/* ========================
   CARRUSEL D'EXPERIÈNCIES
   Adapta les img-wrappers com a slides
   ======================== */
.exp-carousel .experiences-preview__img-wrapper {
  position: relative;
  height: 320px;
  overflow: hidden;
}

.exp-carousel .experiences-preview__img-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Caption com a overlay sobre la imatge */
.exp-carousel .carousel-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  margin: 0;
  padding: var(--space-sm) var(--space-md);
  background: linear-gradient(to top, rgba(59, 37, 7, 0.78) 0%, transparent 100%);
  color: var(--color-white) !important;
  border-top: none;
  text-shadow: 0 1px 4px rgba(0,0,0,0.5);
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 768px) {
  .conf-carousel__btn {
    width: 34px;
    height: 34px;
    font-size: 0.95rem;
  }
}

@media (hover: none) {
  .conf-carousel__btn {
    opacity: 0.85;
  }
}
